<?

/**
* local collection functions of tocmenu_14
*
* @author Adesanto Asman
* @version 1.0
* @license Free
* @copyright Copyright (c)2007, Adesanto Asman
* @package CLHandlers
*
*/

/**
* @package CLHandlers
*
*/
class CLHandlers{

  /**
   * delete an entry
   *
   * @param Database  $Db
   * @param string    $cbCode
   * @param string    $srcDb
   */
  function dbEntDelete(&$Db,
                       &$cbCode,
                        $srcDb){

    $query	= "DELETE
               FROM ".$srcDb."
               WHERE C_B_CODE='".$cbCode."' ";

    $Db->execQuery($query);
  }

  /**
   * insert into master cash bank
   *
   * @param Database  $Db
   * @param string    $values
   * @param string    $srcDb
   */
  function insToMstCb(&$Db,
                      &$values,
                       $srcDb){

    $query	= "INSERT INTO ".$srcDb."
               (C_B_CODE,
                C_B_NAME,
                ACC_NO,
                TYPE,
                CURRENCY,
                GL_ACC,
                GL_SUB_ACC)
               VALUES (".$values.")";

    $Db->execQuery($query);
  }

  /**
   * insert into cash bank allowed users
   *
   * @param Database  $Db
   * @param string    $values
   * @param string    $srcDb
   */
  function insToCbUser(&$Db,
                       &$values,
                        $srcDb){

    $query	= "INSERT INTO ".$srcDb."
               (C_B_CODE,
                NO,
                USERID)
               VALUES (".$values.")";

    $Db->execQuery($query);
  }
}

?>